import { VuexModule, Module, getModule, Mutation } from 'vuex-module-decorators'
import store from '@/store'

@Module({ dynamic: true, name: 'noticeConfig', store, namespaced: false })
class NoticeConfig extends VuexModule {
  public refreshTime: number = Date.now()
  public refreshNotice: number = Date.now()

  @Mutation
  public AddRefreshTime () {
    this.refreshTime = Date.now()
  }

  @Mutation
  public AddRefreshNotice () {
    this.refreshNotice = Date.now()
  }
}

export const noticeConfigModule = getModule(NoticeConfig)
